const { injectBabelPlugin } = require('react-app-rewired');
const rewireLess = require('react-app-rewire-less')
const rewireReactHotLoader = require('react-app-rewire-hot-loader')

/* config-overrides.js */
module.exports = function override(config, env) {
  config = injectBabelPlugin(['import', { libraryName: 'antd', style: 'css'}], config);
  config = rewireLess.withLoaderOptions({
    javascriptEnabled: true,
  })(config, env)
  config = rewireReactHotLoader(config, env)
  // with loaderOptions
  // config = rewireLess.withLoaderOptions(someLoaderOptions)(config, env);
  return config
}
